package com.dy.lock.screen.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.CustomerAttentionDao;
import com.dy.lock.screen.pojo.CustomerAttentionInfo;

@Repository("customerAttentionDao")
public class CustomerAttentionDaoImpl extends
		BaseDaoImpl<CustomerAttentionInfo, String> implements
		CustomerAttentionDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.CustomerAttentionMapper";
	}

	@Override
	public CustomerAttentionInfo queryByPrimaryKey(String id) {
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".selectByPrimaryKey", id);
	}

	@Override
	public List<String> queryByAidOrBeid(
			CustomerAttentionInfo attentionIdOrBeConcernId) {
		return this.getSqlSession().selectList(
				getQueryNamespace() + ".queryByAidOrBeid",
				attentionIdOrBeConcernId);
	}

	@Override
	public CustomerAttentionInfo queryByAidAndBeid(
			CustomerAttentionInfo attentionInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryByAidAndBeid", attentionInfo);
	}

}
